//
//  KeRenRequestTool.h
//  KEREN
//
//  Created by chenliang on 2023/8/8.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^CommunicateSuccess)(BOOL netSuccess,BOOL status);
typedef void(^CommunicateFailure)(BOOL netFailure);
typedef void(^CommunicateDeviceConfigSuccess)(DeviceConfig *config);

@interface KeRenRequestTool : NSObject

//打开和关闭设备
+(void)devicePowerChange:(DeviceInfo *)deviceInfo status:(NSInteger)status bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;

//弹出座位
+(void)deviceTruck:(DeviceInfo *)deviceInfo bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;

//一键寻车
+(void)deviceSearch:(DeviceInfo *)deviceInfo bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;

//结束寻车
+(void)deviceEndSearch:(DeviceInfo *)deviceInfo bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;

//设置车辆靠近解锁等级
+(void)deviceLockDistance:(DeviceInfo *)deviceInfo gear:(int)gear bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;

//设置车辆震动灵敏度
+(void)deviceVibrateSensitivity:(DeviceInfo *)deviceInfo gear:(int)gear bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;


//设置车辆开锁解锁
+(void)deviceLockedStatusChange:(DeviceInfo *)deviceInfo status:(BOOL)status  success:(CommunicateSuccess)success failure:(CommunicateFailure)failure;


//获取设备电量
+(void)deviceElectrict:(DeviceInfo *)deviceInfo bleSuccess:(CommunicateSuccess)success failure:(CommunicateFailure)failure;

//ota升级
+(void)otaCheckVersionAndUpgrade:(DeviceInfo *)deviceInfo;

//获取设备的配置文件
+(void)deviceConfigQuery:(DeviceInfo *)deviceInfo configResult:(CommunicateDeviceConfigSuccess)block;

@end

NS_ASSUME_NONNULL_END
